/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-07 13:44:19  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.bp.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "wwyt_bp_emergency_contingency_plan_archive")
@SQLDelete(sql = "update wwyt_bp_emergency_contingency_plan_archive set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql = "update wwyt_bp_emergency_contingency_plan_archive set DELETE_FLAG = '1' where id= ?")
@Where(clause = "DELETE_FLAG = '0'")

public class BpEmergencyContingencyPlanArchive implements java.io.Serializable {

    // columns START
    // ID，主键
    private Long id;
    // 原预案ID
    private Long planId;
    // 预案名称
    private String name;
    // 预案编号
    private String code;
    // 编制部门ID
    private Long makeDepartId;
    // 编制人
    private Long makeUserId;
    // 开始时间
    private java.util.Date makeTimeStart;
    // 结束时间
    private java.util.Date makeTimeEnd;
    // 适用范围
    private String applicationScope;
    // 事故风险分析
    private String accidentRiskAnalysis;
    // 应急处置措施
    private String emergencyMeasures;
    // 附件ID
    private String attachmentId;
    // 状态
    private Integer state;
    // 审核人
    private Long auditUserId;
    // 审核时间
    private java.util.Date auditTime;
    // 审核备注
    private String auditRemark;
    // 归档时间
    private java.util.Date archiveTime;
    // 创建人
    private Long createBy;
    // 创建时间
    private java.util.Date createTime;
    // 更新人
    private Long updateBy;
    // 更新时间
    private java.util.Date updateTime;
    // 删除标记
    private String deleteFlag;
    // 组织机构代码
    private String orgCode;
    // 租户
    private Long tenentId;
    // columns END
    // 演练方式
    private String actMethod;
    // 演练级别
    private String actLevel;

    @Column(name = "ACT_METHOD", length = 1000)
    public String getActMethod() {
        return actMethod;
    }

    public void setActMethod(String actMethod) {
        this.actMethod = actMethod;
    }

    @Column(name = "ACT_LEVEL", length = 100)
    public String getActLevel() {
        return actLevel;
    }

    public void setActLevel(String actLevel) {
        this.actLevel = actLevel;
    }

    public void setId(Long value) {
        this.id = value;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    @Column(name = "PLAN_ID")
    public Long getPlanId() {
        return this.planId;
    }

    public void setPlanId(Long value) {
        this.planId = value;
    }

    @Column(name = "NAME", length = 100)
    public String getName() {
        return this.name;
    }

    public void setName(String value) {
        this.name = value;
    }

    @Column(name = "CODE", length = 10)
    public String getCode() {
        return this.code;
    }

    public void setCode(String value) {
        this.code = value;
    }

    @Column(name = "MAKE_DEPART_ID")
    public Long getMakeDepartId() {
        return this.makeDepartId;
    }

    public void setMakeDepartId(Long value) {
        this.makeDepartId = value;
    }

    @Column(name = "MAKE_USER_ID")
    public Long getMakeUserId() {
        return this.makeUserId;
    }

    public void setMakeUserId(Long value) {
        this.makeUserId = value;
    }

    @Column(name = "MAKE_TIME_START")
    public java.util.Date getMakeTimeStart() {
        return this.makeTimeStart;
    }

    public void setMakeTimeStart(java.util.Date value) {
        this.makeTimeStart = value;
    }

    @Column(name = "MAKE_TIME_END")
    public java.util.Date getMakeTimeEnd() {
        return makeTimeEnd;
    }

    public void setMakeTimeEnd(java.util.Date makeTimeEnd) {
        this.makeTimeEnd = makeTimeEnd;
    }

    @Column(name = "APPLICATION_SCOPE", length = 500)
    public String getApplicationScope() {
        return this.applicationScope;
    }

    public void setApplicationScope(String value) {
        this.applicationScope = value;
    }

    @Column(name = "ACCIDENT_RISK_ANALYSIS", length = 500)
    public String getAccidentRiskAnalysis() {
        return this.accidentRiskAnalysis;
    }

    public void setAccidentRiskAnalysis(String value) {
        this.accidentRiskAnalysis = value;
    }

    @Column(name = "EMERGENCY_MEASURES", length = 500)
    public String getEmergencyMeasures() {
        return this.emergencyMeasures;
    }

    public void setEmergencyMeasures(String value) {
        this.emergencyMeasures = value;
    }

    @Column(name = "ATTACHMENT_ID")
    public String getAttachmentId() {
        return this.attachmentId;
    }

    public void setAttachmentId(String value) {
        this.attachmentId = value;
    }

    @Column(name = "STATE")
    public Integer getState() {
        return this.state;
    }

    public void setState(Integer value) {
        this.state = value;
    }

    @Column(name = "AUDIT_USER_ID")
    public Long getAuditUserId() {
        return this.auditUserId;
    }

    public void setAuditUserId(Long value) {
        this.auditUserId = value;
    }

    @Column(name = "AUDIT_TIME")
    public java.util.Date getAuditTime() {
        return this.auditTime;
    }

    public void setAuditTime(java.util.Date value) {
        this.auditTime = value;
    }

    @Column(name = "AUDIT_REMARK", length = 200)
    public String getAuditRemark() {
        return this.auditRemark;
    }

    public void setAuditRemark(String value) {
        this.auditRemark = value;
    }

    @Column(name = "ARCHIVE_TIME")
    public java.util.Date getArchiveTime() {
        return this.archiveTime;
    }

    public void setArchiveTime(java.util.Date value) {
        this.archiveTime = value;
    }

    @org.springframework.data.annotation.CreatedBy
    @Column(name = "CREATE_BY")
    public Long getCreateBy() {
        return this.createBy;
    }

    public void setCreateBy(Long value) {
        this.createBy = value;
    }

    @org.springframework.data.annotation.CreatedDate
    @Column(name = "CREATE_TIME")
    public java.util.Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(java.util.Date value) {
        this.createTime = value;
    }

    @org.springframework.data.annotation.LastModifiedBy
    @Column(name = "UPDATE_BY")
    public Long getUpdateBy() {
        return this.updateBy;
    }

    public void setUpdateBy(Long value) {
        this.updateBy = value;
    }

    @org.springframework.data.annotation.LastModifiedDate
    @Column(name = "UPDATE_TIME")
    public java.util.Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(java.util.Date value) {
        this.updateTime = value;
    }

    @Column(name = "DELETE_FLAG", length = 2)
    public String getDeleteFlag() {
        return this.deleteFlag;
    }

    public void setDeleteFlag(String value) {
        this.deleteFlag = value;
    }

    @Column(name = "ORG_CODE", length = 100)
    public String getOrgCode() {
        return this.orgCode;
    }

    public void setOrgCode(String value) {
        this.orgCode = value;
    }

    @Column(name = "TENENT_ID")
    public Long getTenentId() {
        return this.tenentId;
    }

    public void setTenentId(Long value) {
        this.tenentId = value;
    }

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
                .append("planId", getPlanId()).append("name", getName()).append("code", getCode())
                .append("makeDepartId", getMakeDepartId()).append("makeUserId", getMakeUserId())
                .append("makeTime", getMakeTimeStart()).append("applicationScope", getApplicationScope())
                .append("accidentRiskAnalysis", getAccidentRiskAnalysis())
                .append("emergencyMeasures", getEmergencyMeasures()).append("attachmentId", getAttachmentId())
                .append("state", getState()).append("auditUserId", getAuditUserId()).append("auditTime", getAuditTime())
                .append("auditRemark", getAuditRemark()).append("archiveTime", getArchiveTime())
                .append("createBy", getCreateBy()).append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime())
                .append("deleteFlag", getDeleteFlag()).append("orgCode", getOrgCode()).append("tenentId", getTenentId())
                .toString();
    }

    public int hashCode() {
        return new HashCodeBuilder().append(getId()).toHashCode();
    }

    public boolean equals(Object obj) {
        if (obj instanceof BpEmergencyContingencyPlanArchive == false)
            return false;
        if (this == obj)
            return true;
        BpEmergencyContingencyPlanArchive other = (BpEmergencyContingencyPlanArchive) obj;
        return new EqualsBuilder().append(getId(), other.getId()).isEquals();
    }
}
